UI must be created before first render, drainMicroTasks when the first page is created #1103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes the white screen displayed between the launch screen and the initial page view.
Speeds up roughly 300ms startup times for iOS with Angular.
It turns out the UI that is created on viewWillAppear is just a blank Page (we knew that!)
But then few promises resolve leading to the router navigation and building the actual page UI,
these promises are resolved on the main loop, so the iOS have the time to pass a Window layout and render the blank page.
Then, the interesting part, the iOS framework will not run a second layout immediately but will play the intro animation completely, (having 300ms idle time here) and after that run Window layout. In the SDK examples the ListView will start realising cells on that second layout pass and will consume roughly 250ms.
Draining the micro tasks in viewWillAppear will let Angular apps create the UI before the native have a chance to draw a blank screen and will not experience the 300ms. idle delay on startup.
IT IS AWESOME!!!
Now: